package com.example.myapplication.moudule.home.repository;


import com.example.myapplication.base.BaseRepository;
import com.example.myapplication.base.DataResult;
import com.example.myapplication.base.network.rxJava.RxUtil;
import com.example.myapplication.constants.EnvironmentConstants;
import com.example.myapplication.moudule.home.repository.apis.IHomeApis;
import com.example.myapplication.moudule.home.repository.response.HomePageData;
import io.reactivex.Observable;


/**
 * <p>
 * Created by htd on 18-7-28.
 */

public class HomeRepository extends BaseRepository<IHomeApis> {



    @Override
    protected Class<IHomeApis> defServiceType() {
        return IHomeApis.class;
    }


    public Observable<DataResult<HomePageData>> optHomePage(String last_time) {
        return getServer().optHomePage(
                EnvironmentConstants.BASE_URL
                        + "trpc.qqnews_web.kv_srv.kv_srv_http_proxy/list?sub_srv_id=ent&srv_id=pc&offset=0&limit=20&strategy=1&ext={%22pool%22:[%22top%22],%22is_filter%22:10,%22check_type%22:true}"
                , last_time)
                .compose(RxUtil.transSchedule());

    }



}
